<%@ include file="/common/taglibs.jsp"%>

<div style="padding:5px;" align="left">
	<!-- <span class="head-dec">Show Results</span> --><br/><br/>
	<s:form name="result" action="/showResults">
	 <table border="0">
	 	<tr>
	 		<td width="100px;">
     			Academic Year
     		</td>
			<td>
				<s:select  name="academicYear" id="results_academic_year" emptyOption="true" list="academicList" listKey="id" displayName="Class" listValue="academicYear" cssStyle="width:200px" />
			</td>
		</tr>
		<tr><td>&nbsp;</td></tr>	 		
	 	<tr>
	 		<td width="100px;">
     			Class Name
     		</td>
			<td>
				<s:select  name="classYear" id="results_class_name" emptyOption="true" list="classYears" listKey="id" displayName="Class" listValue="name" cssStyle="width:200px" />
			</td>
		</tr>
		<tr><td>&nbsp;</td></tr>
		<tr>
	 		<td width="100px;">
     			Section Name
     		</td>
			<td>
				<s:select  name="sectionName" id="results_section_name" emptyOption="true" list="sectionList" listKey="id" displayName="Section" listValue="sectionName" cssStyle="width:200px" />
			</td>
		</tr>
		<tr><td>&nbsp;</td></tr>		
     	<tr>
	 		<td width="100px;">
     			Exam Name
     		</td>
			<td>
				<s:select  name="examName" id="results_exam_name" emptyOption="true" list="examList" listKey="id" displayName="Class" listValue="examName" cssStyle="width:200px" />
			</td>
		</tr>		
		<tr><td>&nbsp;</td></tr>
		<tr>
			<td colspan="2" align="right">
				<input type="submit" value="Show" id="result_0" class="button-green" >
			</td>
		</tr>	
	</table>
	<br/><br/>
	<table id="instHeaderTable" class="reference">
		<tr>
			<th>Student Id</th>
			<th>Student Name</th>
		</tr>
		<s:iterator value="results" status="rowstatus">
			<tr>
				<td>
					<a href='/showResultByCandidate?method=showResultsByCandidate&studentId=${user.id}&academicYear=${academicYear}&classYear=${classYear.id}&sectionName=${sectionName}&examName=${examName}'>
						<s:property value="user.id" />
					</a>
				</td>
				<td><s:property value="user.username" /></td>
			</tr>
		</s:iterator>			
	</table>
	<s:hidden id="id" name="result.id"></s:hidden>	
	</s:form>
</div> 
